package com.nf.action;

import com.opensymphony.xwork2.ActionSupport;

import java.util.HashMap;
import java.util.Map;

public class TestAction2 extends ActionSupport {
    //存放json对象
    private Map<String,Object> myJsonMap = null;

    public Map<String, Object> getMyJsonMap() {
        return myJsonMap;
    }

    public void setMyJsonMap(Map<String, Object> myJsonMap) {
        this.myJsonMap = myJsonMap;
    }

    @Override
    public String execute() throws Exception {
        myJsonMap = new HashMap<String,Object>();
        myJsonMap.put("level",100);
        myJsonMap.put("hero","牛魔");
        return this.SUCCESS;
    }
}
